package presenters.chain;

import model.IModel;
import events.ViewEvent;

public class PerformTaskHandler extends Handler {
	@Override
	public boolean handle(Object model, Object message) {
		ViewEvent event = (ViewEvent)message;
		IModel iModel = (IModel)model;
		if (event.getAction().equals("perform")) {
			iModel.perform(event.getRows().get(0));
			return true;
		} else
			if (_successor!=null)
				return _successor.handle(model, message);
		return false;
	}
}